package crazy.memory;

class Person
{
	String name;
	int age;
	static int eyeNum;
	
	public void info()
	{
		System.out.println("name:"+name+", age="+age);
	}
}

public class FieldTest
{
	public static void main(String[] args)
	{
		Person.eyeNum = 2;
		System.out.println(Person.eyeNum);
		
		Person p = new Person();
		p.name = "bajie";
		p.age = 300;
		System.out.println(p.eyeNum);//2
		p.info();
		
		Person p2 = new Person();
		p2.name = "laosun";
		p2.age = 500;
		p2.info();
		
		p2.eyeNum = 3;
		
		System.out.println(p.eyeNum); //3
		System.out.println(p2.eyeNum);//3
		System.out.println(Person.eyeNum);//3
		
	}
}
